﻿//-------------------------------------------------------------------
//	Copyright (c) 2012 Fedotov I.V.
//	All rights reserved.
//-------------------------------------------------------------------
/*
	This program is free software: you can redistribute it and/or modify
	it under the terms of the GNU Lesser General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
	GNU Lesser General Public License for more details.

	You should have received a copy of the GNU Lesser General Public License
	along with this program. If not, see http://www.gnu.org/licenses/.

	Project SVN page 
*/

#ifndef __LANGSTRING_H__
#define __LANGSTRING_H__

#include <stdio.h>
#include <string.h>
#include <vector>

#include "../datacontainerbase.h"
#include "../filecontainer.h"
#include "../../sptr.h"
//#include "../simple/ustring.h"
#include "../simple/idlist.h"
#include "langselector.h"
#include "langpairstring.h"
#include "languages.h"

class LangString : public DataContainerBase{

private:

	//SPtr<UString> languageCaption;
	//SPtr<UString> caption;
	
	SPtr<LangSelector> langSelector;
	SPtr<Languages> languages;

	__int64 ID_langSelector;
	__int64 ID_Languages;
	
public:
	
	//setLangSelectorID(__int64 _id);

	IDList<LangPairString>  IDList_langPairUStrings;
	
	void setLangSelector(SPtr<LangSelector> _ls);
	void setLanguages(SPtr<Languages> _lgs);

  LangString();
	LangString(__int64 _ID);
	~LangString();

	long parse();
	long parse(SPtr<FileContainer> _inFileContainer,long _offsetInData);
	int join();

	int checkAndSetObjectsAtIDs();

};


#endif